# import hashlib


class Person:

    def __init__(self, name, age):
        self.name = name
        self.age = age

    def __hash__(self):
        return hash(self.name)

    def __eq__(self, other):
        return self.name == other.name

    def __str__(self):
        return f'{self.name}: {self.age}'


# password = '1qaz2wsx'
# hasher = hashlib.sha1(password.encode())
# print(hasher.hexdigest())
items1 = {
    Person('王大锤', 23), Person('王大锤', 24),
    Person('王大锤', 24), Person('王大锤', 23)
}
print(len(items1))
items2 = {}
items2[Person('王大锤', 18)] = 'hello'
items2[Person('王大锤', 18)] = 'good'
print(items2)
